package com.example.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
@Component
public class AspectByAnnotation {

    @Before("@annotation(com.example.annotation.LogOperation)")
    public void before() {
        log.info("AspectByAnnotation -> before");
    }

    @Before("@annotation(com.example.annotation.LogOperation)")
    public void after() {
        log.info("AspectByAnnotation -> after");
    }
}
